<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>监理服务系统</title>
    <!--公用样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/comment.css"/>
    <!--页面样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/style.css"/>
    <!--Layui-->
    <link rel="stylesheet" href="${re.contextPath}/plugin/layui/css/layui.css" media="all"/>
    <!--页面样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/extended.css"/>
    <!--JQ-->
    <script type="text/javascript" charset="utf-8"
            src="${re.contextPath}/plugin/common/js/jquery-1.8.3.min.js"></script>
    <!--Layui-->
    <script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.js" charset="utf-8"></script>
    <!--公用样式JS-->
    <script type="text/javascript" src="${re.contextPath}/plugin/common/js/comment.js" charset="utf-8"></script>
    <!--进度条-->
    <style>
        .layui-table-cell {
            height: 46px;
            line-height: 46px;
        }
    </style>
</head>

<body>
<!--容器-->

<div class="container index clearfix">
    <!--右侧内容-->
    <div class="Right fr" style="width: 100%;background-color: white;">
        <div class="module whitebg" style="height:470px">
            <h3 align="left" style="margin-left: 20px;font-weight: bolder;">${project.projectName}项目应接人员系统账号信息</h3>
            <div>
                <table style="border: 1px solid red;width: 100%;margin-top: 10px;">
                    <tr style="background: #F1F4FB;border: 1px solid lightgrey;">
                        <td colspan="3" style="padding-left: 20px;">项目名称:&nbsp;${project.projectName}</td>
                        <td colspan="3" style="padding-left: 20px;">应接单位:&nbsp;${acceptComName}</td>
                    </tr>
                    <tr style="border: 1px solid red">
                        <td colspan="2" style="border: 1px solid lightgrey; text-align: center;">
                            合同负责人:&nbsp;${userAccept.realName}</td>
                        <td colspan="2" style="border: 1px solid lightgrey; text-align: center;">
                            用户名:&nbsp;${userAccept.username}</td>
                        <td colspan="2" style="border: 1px solid lightgrey; text-align: center;">默认密码：12345678</td>
                    </tr>

                    <#if "${project.projectType}"?contains("001")  >
                        <tr style="border: 1px solid red">
                            <td colspan="2" style="border: 1px solid lightgrey; text-align: center;">
                                监理项目经理:&nbsp;${jlxmjl.realName}</td>
                            <td colspan="2" style="border: 1px solid lightgrey; text-align: center;">
                                用户名:&nbsp;${jlxmjl.username}</td>
                            <td colspan="2" style="border: 1px solid lightgrey; text-align: center;">默认密码：12345678</td>
                        </tr>
                    </#if>
                    <#if "${project.projectType}"?contains("002")  >
                        <tr style="border: 1px solid red">
                            <td colspan="2" style="border: 1px solid lightgrey; text-align: center;">
                                咨询项目经理:&nbsp;${zxxmjl.realName}</td>
                            <td colspan="2" style="border: 1px solid lightgrey; text-align: center;">
                                用户名:&nbsp;${zxxmjl.username}</td>
                            <td colspan="2" style="border: 1px solid lightgrey; text-align: center;">默认密码：12345678</td>
                        </tr>
                    </#if>
                    <#if "${project.projectType}"?contains("003")  >
                    <tr style="border: 1px solid red">
                        <td colspan="2" style="border: 1px solid lightgrey; text-align: center;">
                            检测项目经理:&nbsp;${jcxmjl.realName}</td>
                        <td colspan="2" style="border: 1px solid lightgrey; text-align: center;">
                            用户名:&nbsp;${jcxmjl.username}</td>
                        <td colspan="2" style="border: 1px solid lightgrey; text-align: center;">默认密码：12345678</td>
                    </tr>
                    </#if>
                    <#if "${project.projectType}"?contains("100")  >
                        <tr style="border: 1px solid red">
                            <td colspan="2" style="border: 1px solid lightgrey; text-align: center;">
                                其他项目经理:&nbsp;${qtxmjl.realName}</td>
                            <td colspan="2" style="border: 1px solid lightgrey; text-align: center;">
                                用户名:&nbsp;${qtxmjl.username}</td>
                            <td colspan="2" style="border: 1px solid lightgrey; text-align: center;">默认密码：12345678</td>
                        </tr>
                    </#if>
                </table>
            </div>

        </div>
    </div>
</div>
<!--公用样式JS-->
<script type="text/javascript" src="${re.contextPath}/plugin/tools/tool.js"></script>
<script type="text/javascript" src="${re.contextPath}/plugin/tools/cardUtils.js"></script>

<script type="text/html" id="toolBar">
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看详情</a>
</script>

<script>
    var element = "";
    var layer;
    var tableIns;

    function query() {
        table.reload('projectList', {
            where: {
                province: $('#province').val(),
                city: $('#city').val(),
                county: $('#county').val(),
                projectRole: $('#proRole').val(),
                hyType: $('#hyType').val(),
                projectType: $('#proType').val(),
                htMoneyMin: $('#htMoneyMin').val(),
                htMoneyMax: $('#htMoneyMax').val(),
                tzMoneyMin: $('#tzMoneyMin').val(),
                tzMoneyMax: $('#tzMoneyMax').val()
            }
        });
    }

    function getCity(e) {
        if (!$(e).val()) {
            $("#city").empty();
            $("#city").append("<option value=''>" + "请选择" + "</option>");
            $("#county").empty();
            $("#county").append("<option value=''>" + "请选择" + "</option>");
            form.render('select');
        }
        layerAjaxGet("/sys/register/getCity",{"code": $(e).val()},'',function (data) {
            if (data.flag) {
                $("#city").empty();
                $("#county").empty();
                $("#city").append("<option value=''>" + "请选择" + "</option>");
                $("#county").append("<option value=''>" + "请选择" + "</option>");
                for (var i = 0; i < data.data.length; i++) {
                    $("#city").append("<option value='" + data.data[i].code + "'>" + data.data[i].name + "</option>");
                }
                form.render('select');
            }
        })
        // $.ajax({
        //     cache: true,
        //     type: "get",
        //     url: "/sys/register/getCity",
        //     data: {"code": $(e).val()},
        //     success: function (data) {
        //         if (data.flag) {
        //             $("#city").empty();
        //             $("#county").empty();
        //             $("#city").append("<option value=''>" + "请选择" + "</option>");
        //             $("#county").append("<option value=''>" + "请选择" + "</option>");
        //             for (var i = 0; i < data.data.length; i++) {
        //                 $("#city").append("<option value='" + data.data[i].code + "'>" + data.data[i].name + "</option>");
        //             }
        //             form.render('select');
        //         }
        //     }, error: function (error) {
        //         console.log(error);
        //         return;
        //     }
        // })
    }


    function getCounty(e) {
        if (!$(e).val()) {
            $("#county").empty();
            $("#county").append("<option value=''>" + "请选择" + "</option>");
            form.render('select');
        }
        layerAjaxGet("/sys/register/getCity",{"code": $(e).val()},'',function (data) {
            if (data.flag) {
                $("#county").empty();
                $("#county").append("<option value=''>" + "请选择" + "</option>");
                for (var i = 0; i < data.data.length; i++) {
                    $("#county").append("<option value='" + data.data[i].code + "'>" + data.data[i].name + "</option>");
                }
                form.render('select');
            }
        })
        // $.ajax({
        //     cache: true,
        //     type: "get",
        //     url: "/sys/register/getCity",
        //     data: {"code": $(e).val()},
        //     success: function (data) {
        //         if (data.flag) {
        //             $("#county").empty();
        //             $("#county").append("<option value=''>" + "请选择" + "</option>");
        //             for (var i = 0; i < data.data.length; i++) {
        //                 $("#county").append("<option value='" + data.data[i].code + "'>" + data.data[i].name + "</option>");
        //             }
        //             form.render('select');
        //         }
        //     }, error: function (error) {
        //         console.log(error);
        //         return;
        //     }
        // })
    }

    $(function () {
        layui.use(['table', 'element'], function () {
            table = layui.table;
            //方法级渲染
            tableIns = table.render({
                id: 'projectList',
                elem: '#projectList',
                url: '/sys/statistics/showProjectList',
                parseData: function (res) {
                    if (res && res.length >= 0) {
                        return {
                            "code": 0,
                            "msg": "加载成功",
                            "count": res.length,
                            "data": res
                        }
                    }
                },
                cols: [[
                    // {title: '统计项目', width: '5%',field: 'subject'},
                    {title: '统计项目', field: 'subject', width: '50%', sort: false},
                    {title: '统计数据', field: 'data', width: '50%', sort: false}
                ]],
            });
        })
    })
</script>
</body>
</html>